Video Processing Method, Terminal and Server

ABSTRACT

A video processing method, a terminal, and a server, where the method includes receiving a media presentation description (MPD) file sent by the server, where the MPD file includes region information of a region that can be independently decoded in the video, determining, according to the region information, a region used for playback on a terminal from the region that can be independently decoded, determining a to-be-acquired media segment according to the MPD file, acquiring a location in which data content is stored in the media segment, acquiring, according to the location in which the data content is stored in the media segment, the data content from the media segment stored in the server, and playing a picture of the region for the playback on the terminal. Therefore, it is not required to independently store a partial video on the server, thereby saving a storage resource of the server.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/243,098 filed on Aug. 22, 2016, which is a continuation applicationof international patent application number PCT/CN2014/072379 filed onFeb. 21, 2014. All of the afore-mentioned patent applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

Embodiments of the present disclosure relate to the field of wirelesscommunications, and in particular, to a video processing method, aterminal, and a server.

BACKGROUND

For a video using the High Efficiency Video Coding (HEVC) standard,there is a requirement for acquiring a regional picture from the videoin a video playback process. For example, FIG. 1 is a schematic diagramof a scenario in which a regional picture in a video needs to beacquired. A European Cup match is shot using a panoramic shootingtechnology, and a shot panoramic video has a resolution of 6 kilo(K)×2K. The video with this resolution is suitable for playback on apanoramic display with an ultra-high resolution. If a user wants to viewthis panoramic video on a common screen, because of a low resolution ofthe common screen, a regional picture from the panoramic video needs tobe acquired before the regional picture can be played on the commonscreen. As shown in FIG. 1, an upper part is a panoramic screen, and alower part is a mobile phone screen and a computer screen. The panoramicscreen can display a complete video picture, but neither the mobilephone screen nor the computer screen can display a complete panoramicvideo picture. Therefore, during playback on the mobile phone screen orthe computer screen, a regional picture similar to that shown in adashed block region in FIG. 1 needs to be acquired first, and then theregional picture is displayed on the mobile phone screen or the computerscreen.

For another example, FIG. 2 is a schematic diagram of another scenarioin which a regional picture in a video needs to be acquired. In videosurveillance, pictures shot by multiple cameras may be spliced to formone surveillance video. During playback of the surveillance video, auser needs to acquire a regional picture of the surveillance video forplayback if the user needs to specify a picture shot by one camera ofthe multiple cameras for playback. As shown in FIG. 2, a surveillancevideo is on the left side. Each image in the video includes picturesshot by multiple cameras. When it is assumed that a region identified bya dashed block is a regional picture specified by a user, the regionalpicture needs to be acquired for independent playback.

The HEVC introduces a concept of a region that can be independentlydecoded. The region that can be independently decoded may be arectangular region in a video picture. Because video content within thisregion can be decoded independently, the user can independently requestthe video content in this region. Furthermore, as shown in FIG. 3, aregion in a dashed block is the region that can be independentlydecoded. The user may request to play entire video content in a terminalscreen, or may request to play video content only in the dashed block.

The Dynamic Adaptive Streaming over Hypertext Transfer Protocol (DASH)technology combines features of progressive downloading and playback ina conventional streaming technology and the HyperText Transfer Protocol(HTTP).

A DASH system may include a DASH server and a DASH terminal. The DASHserver mainly stores two parts of content, media presentationdescription (MPD) and media. The MPD records media information such as amedia segment address using the Extensible Markup Language (XML). Themedia may be media content such as a video or an audio. A video is usedas an example. The video includes a media segment. Each media segmentcorresponds to a section of video content. Each media segment alsocorresponds to one segment address. The segment address is an HTTPnetwork address and is also referred to as an acquiring address of themedia segment. The DASH terminal may acquire the segment address byparsing the MPD, and acquire, from the DASH server using the acquiredsegment address, video content corresponding to the media segment.

In the prior art, to implement playback of a region in a video picture,a DASH server needs to independently store, in advance, content of apartial video of which a region needs to be played, that is, bothcontent of the partial video and content of a panoramic video need to bestored independently in the DASH server. Consequently, the DASH serverstores excessive redundant information, wasting a storage resource ofthe DASH server.

SUMMARY

Embodiments of the present disclosure provide a video processing method,a terminal, and a server in order to prevent a waste of a storageresource of a DASH server.

A first aspect of the embodiments of the present disclosure provides avideo processing method, including sending, to a server, a request foracquiring an MPD file of a video, receiving the MPD file sent by theserver, where the MPD file includes region information of a region thatcan be independently decoded in the video, determining, according to theregion information, a region used for playback on the terminal from theregion that can be independently decoded, determining a to-be-acquiredmedia segment according to the MPD file, acquiring a location in whichdata content corresponding to the region for the playback on theterminal is stored in the media segment, acquiring, according to thelocation in which the data content corresponding to the region for theplayback on the terminal is stored in the media segment, the datacontent corresponding to the region for the playback on the terminalfrom the media segment stored in the server, and playing, according tothe data content corresponding to the region for the playback on theterminal, a picture of the region for the playback on the terminal.

With reference to the first aspect, in an implementation manner of thefirst aspect, the media segment includes at least two subsegments, andacquiring a location in which data content corresponding to the regionfor the playback on the terminal is stored in the media segment includesacquiring, from the server, a segment index and a subsample index of themedia segment, where the segment index is used to indicate a location inwhich each subsegment included in the media segment is stored in themedia segment, and the subsample index is used to indicate a location inwhich each subsample corresponding to the region that can beindependently decoded is stored in each subsegment, determining ato-be-acquired subsegment according to the segment index, anddetermining, according to a location in which the subsegment is storedin the media segment and a location in which a subsample correspondingto the region for the playback on the terminal in the region that can beindependently decoded is stored in the subsegment, the location in whichthe data content corresponding to the region for the playback on theterminal is stored in the media segment.

With reference to the first aspect or the foregoing implementationmanner, in another implementation manner of the first aspect, thesegment index and the subsample index are both located in a header ofthe media segment, and the subsample index is adjacent to the segmentindex, and acquiring, from the server, a segment index and a subsampleindex of the media segment includes acquiring, according to an addressfor acquiring the media segment, the segment index and the subsampleindex that are located in the header of the media segment.

With reference to the first aspect or the foregoing implementationmanner, in another implementation manner of the first aspect, the mediasegment includes at least two sections, each section includes at leastone subsegment, the segment index includes a first index and a secondindex, and a header of each section includes one second index and onesubsample index adjacent to the second index. The first index is locatedin a header of the media segment and used to indicate a start locationof each second index of the media segment in the media segment. Thesecond index is used to indicate a location in which a subsegment of asection in which the second index is located is stored in the mediasegment, and acquiring, from the server, a segment index and a subsampleindex of the media segment includes acquiring, according to an addressfor acquiring the media segment, the first index located in the headerof the media segment, and acquiring each second index and a subsampleindex adjacent to each second index according to the start location,indicated by the first index, of each second index in the media segment.

With reference to the first aspect or the foregoing implementationmanner, in another implementation manner of the first aspect, the MPDfile includes a correspondence between an address for acquiring themedia segment and an address for acquiring an index segment, the indexsegment is dedicatedly used to store the segment index and the subsampleindex of the media segment, and in the index segment, the sub sampleindex is adjacent to the segment index, and acquiring, from the server,a segment index and a subsample index of the media segment includesacquiring, from the MPD file according to the correspondence between theaddress for acquiring the media segment and the address for acquiringthe index segment, the address for acquiring the index segmentcorresponding to the address for acquiring the media segment, andacquiring the segment index and the subsample index according to theaddress for acquiring the index segment.

With reference to the first aspect or any one of the foregoingimplementation manners, in another implementation manner of the firstaspect, the MPD file includes a correspondence between the region forthe playback on the terminal and the location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment, and acquiring a location in which data contentcorresponding to the region for the playback on the terminal is storedin the media segment includes acquiring, from the MPD file according tothe region for the playback on the terminal and the correspondencebetween the region for the playback on the terminal and the location inwhich the data content corresponding to the region for the playback onthe terminal is stored in the media segment, the location in which thedata content is stored in the media segment.

With reference to the first aspect or any one of the foregoingimplementation manners, in another implementation manner of the firstaspect, acquiring, according to the location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment, the data content corresponding to the region forthe playback on the terminal from the media segment stored in the serverincludes determining, according to the address for acquiring the mediasegment and the location in which the data content is stored in themedia segment, an address, acquired from the MPD file, for acquiring thedata content, where the address for acquiring the data content includesthe address for acquiring the media segment and the location in whichthe data content is stored in the media segment, sending the address foracquiring the data content to the server, and receiving the data contentthat is sent by the server and corresponds to the address for acquiringthe data content.

With reference to the first aspect or any one of the foregoingimplementation manners, in another implementation manner of the firstaspect, determining, according to the region information, a region usedfor playback on the terminal from the region that can be independentlydecoded includes presenting, to a user of the terminal according to theregion information, the region that can be independently decoded, anddetermining, as the region for the playback on the terminal, a regionselected by the user from the region that can be independently decoded,or determining, as the region for the playback on the terminal accordingto the region information, a region that matches a capability of theterminal and is in the region that can be independently decoded.

A second aspect of the embodiments of the present disclosure provides avideo processing method, including sending an MPD file of a video to aterminal according to a request, sent by the terminal, for acquiring theMPD file of the video, where the MPD file includes region information ofa region that can be independently decoded in the video, receiving alocation, sent by the terminal, in which data content corresponding to aregion used for playback on the terminal is stored in the media segmentof the video, where the region for the playback on the terminal isdetermined by the terminal according to the region information and fromthe region that can be independently decoded, and sending, to theterminal according to the location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment, the data content that is stored in the mediasegment and corresponds to the location in which the data content isstored in the media segment, where the data content corresponding to theregion for the playback on the terminal is used for the terminal to playa picture of the region for the playback on the terminal.

With reference to a second aspect, in an implementation manner of thesecond aspect, the media segment includes at least two subsegments, andbefore receiving a location, sent by the terminal, in which data contentcorresponding to a region used for playback on the terminal is stored inthe media segment of the video, the method further includes receivingacquiring information sent by the terminal, where the acquiringinformation is used for acquiring a segment index and a subsample indexof the media segment, the segment index is used to indicate a locationin which each subsegment included in the media segment is stored in themedia segment, the subsample index is used to indicate a location inwhich each subsample corresponding to the region that can beindependently decoded is stored in each subsegment, and the location inwhich each subsample corresponding to the region that can beindependently decoded is stored in each subsegment and the location inwhich each subsegment is stored in the media segment are used todetermine the location in which the data content corresponding to theregion for the playback on the terminal is stored in the media segment,and sending the segment index and the subsample index to the terminalaccording to the acquiring information.

A third aspect of the embodiments of the present disclosure provides aterminal, including a sending unit configured to send, to a server, arequest for acquiring an MPD file of a video, a receiving unitconfigured to receive the MPD file sent by the server, where the MPDfile includes region information of a region that can be independentlydecoded in the video, a first determining unit configured to determine,according to the region information included in the MPD file received bythe receiving unit, a region used for playback on the terminal from theregion that can be independently decoded, a second determining unitconfigured to determine a to-be-acquired media segment according to theMPD file received by the receiving unit, a first acquiring unitconfigured to acquire a location in which data content corresponding tothe region, determined by the first determining unit, for the playbackon the terminal is stored in the media segment determined by the seconddetermining unit, where the data content is used for the terminal toplay a picture of the region for the playback on the terminal, a secondacquiring unit configured to acquire, according to the location,acquired by the first acquiring unit, in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment, the data content corresponding to the region forthe playback on the terminal from the media segment stored in theserver, and a playback unit configured to play, according to the datacontent that is acquired by the second acquiring unit and corresponds tothe region for the playback on the terminal, a picture of the region forthe playback on the terminal.

With reference to the third aspect, in an implementation manner of thethird aspect, the media segment includes at least two subsegments, andthe first acquiring unit is further configured to acquire, from theserver, a segment index and a subsample index of the media segment,where the segment index is used to indicate a location in which eachsubsegment included in the media segment is stored in the media segment,and the subsample index is used to indicate a location in which eachsubsample corresponding to the region that can be independently decodedis stored in each subsegment, determine a to-be-acquired subsegmentaccording to the segment index, and determine, according to a locationin which the subsegment is stored in the media segment and a location inwhich a subsample corresponding to the region for the playback on theterminal in the region that can be independently decoded is stored inthe subsegment, the location in which the data content corresponding tothe region for the playback on the terminal is stored in the mediasegment.

With reference to the third aspect or any one of the foregoingimplementation manners, in another implementation manner of the thirdaspect, the segment index and the subsample index are both located in aheader of the media segment, and the subsample index is adjacent to thesegment index, and the first acquiring unit acquiring, from the server,a segment index and a subsample index of the media segment furtherincludes acquiring, according to an address for acquiring the mediasegment, the segment index and the subsample index that are located inthe header of the media segment.

With reference to the third aspect or any one of the foregoingimplementation manners, in another implementation manner of the thirdaspect, the media segment includes at least two sections, each sectionincludes at least one subsegment, the segment index includes a firstindex and a second index, and a header of each section includes onesecond index and one subsample index adjacent to the second index. Thefirst index is located in a header of the media segment and used toindicate a start location of each second index of the media segment inthe media segment. The second index is used to indicate a location inwhich a subsegment of a section in which the second index is located isstored in the media segment, and the first acquiring unit acquiring,from the server, a segment index and a subsample index of the mediasegment further includes acquiring, according to an address foracquiring the media segment, the first index located in the header ofthe media segment, and acquiring each second index and a subsample indexadjacent to each second index according to the start location, indicatedby the first index, of each second index in the media segment.

With reference to the third aspect or any one of the foregoingimplementation manners, in another implementation manner of the thirdaspect, the MPD file includes a correspondence between an address foracquiring the media segment and an address for acquiring an indexsegment, the index segment is dedicatedly used to store the segmentindex and the subsample index of the media segment, and in the indexsegment, the subsample index is adjacent to the segment index, and thefirst acquiring unit acquiring, from the server, a segment index and asubsample index of the media segment further includes acquiring, fromthe MPD file according to the correspondence between the address foracquiring the media segment and the address for acquiring the indexsegment, the address for acquiring the index segment corresponding tothe address for acquiring the media segment, and acquiring the segmentindex and the subsample index according to the address for acquiring theindex segment.

With reference to the third aspect or any one of the foregoingimplementation manners, in another implementation manner of the thirdaspect, the MPD file includes a correspondence between the region forthe playback on the terminal and the location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment, and the first acquiring unit acquiring, from theserver, a segment index and a subsample index of the media segmentfurther includes acquiring, from the MPD file according to the regionfor the playback on the terminal and the correspondence between theregion for the playback on the terminal and the location in which thedata content corresponding to the region for the playback on theterminal is stored in the media segment, the location in which the datacontent is stored in the media segment.

With reference to the third aspect or any one of the foregoingimplementation manners, in another implementation manner of the thirdaspect, the second acquiring unit is further configured to determine,according to the address for acquiring the media segment and thelocation in which the data content is stored in the media segment, anaddress, acquired from the MPD file, for acquiring the data content,where the address for acquiring the data content includes the addressfor acquiring the media segment and the location in which the datacontent is stored in the media segment, send the address for acquiringthe data content to the server, and receive the data content that issent by the server and corresponds to the address for acquiring the datacontent.

With reference to the third aspect or any one of the foregoingimplementation manners, in another implementation manner of the thirdaspect, the first determining unit is further configured to present, toa user of the terminal according to the region information, the regionthat can be independently decoded, and determine, as the region for theplayback on the terminal, a region selected by the user from the regionthat can be independently decoded, or determine, as the region for theplayback on the terminal according to the region information, a regionthat matches a capability of the terminal and is in the region that canbe independently decoded.

According to a fourth aspect, a server is provided, including areceiving unit configured to receive a request, sent by a terminal, foracquiring an MPD file of a video, a storage unit configured to store theMPD file of the video, and a sending unit configured to send the MPDfile, stored in the storage unit, of the video to the terminal accordingto the request, sent by the terminal, for the MPD file of the video,where the MPD file includes region information of a region that can beindependently decoded in the video, where the receiving unit is furtherconfigured to receive a location, sent by the terminal, in which datacontent corresponding to a region used for playback on the terminal isstored in the media segment of the video, where the region for theplayback on the terminal is determined by the terminal according to theregion information and from the region that can be independentlydecoded. The storage unit is further configured to store the mediasegment of the video, and the sending unit is further configured tosend, to the terminal according to the location, received by thereceiving unit, in which the data content corresponding to the regionfor the playback on the terminal is stored in the media segment, thedata content that is stored by the storage unit in the media segment andcorresponds to the location in which the data content is stored in themedia segment, where the data content corresponding to the region forthe playback on the terminal is used for the terminal to play a pictureof the region.

With reference to the fourth aspect, in an implementation manner of thefourth aspect, the media segment includes at least two subsegments, andthe receiving unit is further configured to receive acquiringinformation sent by the terminal, where the acquiring information isused for acquiring a segment index and a subsample index of the mediasegment, the segment index is used to indicate a location in which eachsubsegment included in the media segment is stored in the media segment,the subsample index is used to indicate a location in which eachsubsample corresponding to the region that can be independently decodedis stored in each subsegment, and the location in which each subsamplecorresponding to the region that can be independently decoded is storedin each subsegment and the location in which each subsegment is storedin the media segment are used to determine the location in which thedata content corresponding to the region for the playback on theterminal is stored in the media segment. The storage unit is furtherconfigured to store the segment index and the subsample index, and thesending unit is further configured to send the segment index and thesubsample index to the terminal according to the acquiring information.

In the embodiments of the present disclosure, a location in which datacontent corresponding to a region for playback on a terminal is storedin a media segment is acquired, and the data content is acquiredaccording to the storage location and from the media segment stored in aserver. Therefore, it is not required to independently store content ofa partial video on the server, thereby saving a storage resource of theserver.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentdisclosure more clearly, the following briefly introduces theaccompanying drawings required for describing the embodiments of thepresent disclosure. The accompanying drawings in the followingdescription show merely some embodiments of the present disclosure, anda person of ordinary skill in the art may still derive other drawingsfrom these accompanying drawings without creative efforts.

FIG. 1 is a schematic diagram of a scenario in which a regional picturein a video needs to be acquired;

FIG. 2 is a schematic diagram of another scenario in which a regionalpicture in a video needs to be acquired;

FIG. 3 is a diagram of an example of a region that can be independentlydecoded;

FIG. 4 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure;

FIG. 5 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure;

FIG. 6 is a schematic structural diagram of a segment index and asubsegment index;

FIG. 7 is a schematic diagram of distribution locations of a segmentindex and a subsample index;

FIG. 8 is another schematic diagram of distribution locations of asegment index and a subsample index;

FIG. 9 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure;

FIG. 10 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure;

FIG. 11 is a schematic block diagram of a terminal according to anembodiment of the present disclosure;

FIG. 12 is a schematic block diagram of a server according to anembodiment of the present disclosure;

FIG. 13 is a schematic block diagram of a terminal according to anembodiment of the present disclosure; and

FIG. 14 is a schematic block diagram of a server according to anembodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in theembodiments of the present disclosure with reference to the accompanyingdrawings in the embodiments of the present disclosure. The describedembodiments are some but not all of the embodiments of the presentdisclosure. All other embodiments obtained by a person of ordinary skillin the art based on the embodiments of the present disclosure withoutcreative efforts shall fall within the protection scope of the presentdisclosure.

It should be understood that, in a server (such as a DASH server), avideo includes a media segment. A process in which a terminal acquires avideo from the server is actually a process in which the terminalacquires media segments one by one from the server. That is, theterminal acquires media segments of the video one by one when theterminal needs to play a section of a video, thereby implementingprogressive acquisition of the video.

The MPD file records an address for acquiring the media segments. Theterminal may acquire, from the MPD file, an address for acquiring amedia segment when the terminal needs to acquire the media segment ofthe video, and then acquire the media segment from the server accordingto the address for acquiring the media segment. It should be noted that,in the embodiments of the present disclosure, the address for acquiringthe media segment may refer to an address at which the terminal mayacquire content of the media segment. In the MPD file, the address foracquiring the media segment includes a base address of the video and anaddress at which the media segment is stored in the video. The followingdescribes how to acquire the address for acquiring the media segmentwith reference to an example of a section of information recorded in anMPD file (hereinafter referred to as an MPD file 1).

MPD is described as follows:

<MPD> ... <BaseURL>http://www.example.com/ server/Segments/</Base URL>... <Representation id=‘R0’  width=‘1920’ height=‘1080’ frameRate=‘30’bandwidth=‘256000’> <SegmentList duration=‘10’> <SegmentURLmedia=‘seg-full-1.mp4’/> <SegmentURL media=‘seg-full-2.mp4’/> ...</SegmentList> </Representation> ... </MPD>

In the MPD file 1, BaseURL is a base address of the video and it ishttp://www.example.com/server/Segments. One Representation represents asection of a video. SegmentList indicates a list of addresses at whichmedia segments included in the video are stored in the video. SegmentURLmedia in the SegmentList indicates a storage address of the mediasegment. For example, in the foregoing program, ‘seg-full-1.mp4’/>indicates that a storage address of a first media segment of the videois seg-full-1.mp4, and ‘seg-full-2.mp4’/> indicates that a storageaddress of a second media segment of the video is seg-full-2.mp4.

An example in which the terminal needs to acquire the first mediasegment of the video is used for description. The terminal needs toacquire the base address, http://www.example.com/server/Segments, of thevideo from the MPD file 1 and the storage address: seg-full-1.mp4, ofthe first media segment. Then, according to the base address of thevideo and the storage address of the first media segment, the terminalacquires the following address for acquiring the first media segment:http://www.example.com/server/Segments/seg-full-1.mp4. That is, theaddress for acquiring the first media segment includes the base addressof the video to which the first media segment belongs and the storageaddress of the first media segment. The terminal can download the firstmedia segment from the server according to the address for acquiring thefirst media segment.

A section of a video may include one region that can be independentlydecoded, or may include multiple regions that can be independently andseparately decoded. A quantity of regions that can be independentlydecoded and a division form of regions that can be independently decodedmay be determined by a provider of the video.

It should be noted that the region that can be independently decoded mayalso be referred to as a motion constrained tile sets (MCTS). The tileset includes at least one tile. The tile is a concept at a coding layer.Each tile may correspond to one region in a video picture. Further, atthe coding layer, a coded video includes a network abstraction layer(NAL) packet. One tile may corresponds to one or more NAL packets. Froma perspective of the coding layer, a process of acquiring the regionthat can be independently decoded may be a process of downloading a NALpacket corresponding to each tile in the tile set.

In the prior art, the server stores not only panoramic content of avideo, but also stores content of a partial video, which causes a wasteof a storage resource of the server. An embodiment of the presentdisclosure provides a video processing method, which can avoid a wasteof a storage resource of a server. A specific discussion is as follows.

FIG. 4 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure. The method may be performedby a terminal that plays a video. The method includes the followingsteps.

Step 410: Sending, to a server, a request for acquiring an MPD file of avideo.

For example, the request may include an identifier of the MPD file. Aspecific process may refer to the prior art, and details are notdescribed herein.

Step 420: Receiving the MPD file sent by the server, where the MPD fileincludes region information of a region that can be independentlydecoded in the video.

To enable a terminal to acquire the region that can be independentlydecoded in the video, the region information of the region that can beindependently decoded may be included in the MPD file. The regioninformation may include a region index number of the region that can beindependently decoded, a location parameter of the region that can beindependently decoded in an entire video picture, a frame rate duringplayback of the region that can be independently decoded and/or atransmission bandwidth of the region that can be independently decoded,or the like.

Step 430: Determining, according to the region information, a regionused for playback on a terminal from the region that can beindependently decoded.

Optionally, in an embodiment, the terminal may present, to a user of theterminal according to the region information of the region that can beindependently decoded, the region that can be independently decoded,where the region information is included in the MPD file, and determine,as the region for the playback on the terminal, a region selected by theuser from the region that can be independently decoded when implementingstep 420. It should be understood that the region that can beindependently decoded may be presented to the user of the terminalbefore playback of the video, or the region that can be independentlydecoded may be presented to the user according to a request of the userof the terminal in a playback process of the video.

Optionally, in another embodiment, the terminal may determine, as theregion for the playback on the terminal according to the regioninformation of the region that can be independently decoded, a regionthat matches a capability of the terminal and is in the region that canbe independently decoded when implementing step 420, where the regioninformation is included in the MPD file. For example, a resolution ofeach region of the region that can be independently decoded is recordedin the region information, and then a region that has a resolutionclosest to a resolution supported by the terminal from the resolution ofeach region is selected as the region for the playback on the terminal.For another example, a bandwidth required by each region of the regionthat can be independently decoded is recorded in the region information,and then a region that has a bandwidth closest to a current bandwidth ofthe terminal from the bandwidth required by each region is selected asthe region for the playback on the terminal.

Step 440: Determining a to-be-acquired media segment according to theMPD file.

For example, to sequentially play a section of a video, the terminal mayacquire, according to a sequence of media segments, addresses foracquiring media segments one by one from a segment list recorded in theMPD file. Alternatively, the terminal may calculate, according toduration of each media segment of the video, an address for acquiring amedia segment corresponding to the middle moment when the terminalstarts playback at a middle moment of a section of a video, where theduration is recorded in the MPD file. A specific process may follow theprior art, and details are not described herein.

Step 450: Acquiring a location in which data content corresponding tothe region for the playback on the terminal is stored in the mediasegment, where the data content is used for terminal to play a pictureof the region for the playback on the terminal.

It should be noted that the data content corresponding to the region forthe playback on the terminal may further refer to data content requiredfor playing a partial video in the region. That is, the data content isused for playing a picture of the region. That is, a video picture inthe region is displayed on the terminal when the terminal downloads,from the media segment, and plays the data content corresponding to theregion.

Optionally, the location in which the data content is stored in themedia segment may be a byte range of the data content in the mediasegment. For example, a size of a media segment is 50,000 bytes, and thedata content corresponding to the region for the playback on theterminal is located in the 10000^(th) to 15000^(th) bytes.Alternatively, the location in which the data content is stored in themedia segment may also be a combination of an offset of a start locationof the data content relative to a start location of the media segmentand the size of the data content. For example, a media segment includes50,000 bytes, and the data content corresponding to the region for theplayback on the terminal starts from the 10000^(th) byte of the mediasegment and has a size of 5000 bytes. The foregoing is merely anexample. This embodiment of the present disclosure imposes no specificlimitation on the location in which the data content is stored in themedia segment.

This embodiment of the present disclosure imposes no specific limitationon a manner of acquiring the location in which the data content isstored in the media segment. For example, the storage location may berecorded in the MPD file. Certainly, the storage location may also berecorded in the server, or the storage location may be indirectlyacquired according to an indication of other index information. Asubsequent embodiment describes in detail a specific manner of acquiringthe storage location.

Step 460: Acquiring, according to the location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment, the data content corresponding to the region forthe playback on the terminal from the media segment stored in theserver.

Furthermore, the terminal may acquire, from the MPD file, an address foracquiring the media segment. For example, the terminal acquires, basedon the address for acquiring the media segment and the location in whichthe data content is stored in the media segment, the address foracquiring the data content. The address for acquiring the data contentincludes the address for acquiring the media segment and the location inwhich the data content is stored in the media segment. Further, theaddress for acquiring the data content is sent to the server, and thedata content that is sent by the server and corresponds to the locationin which the data content is stored in the media segment is received.For example, the address for acquiring the media segment ishttp://www.example.com/server/Segments/seg-full-1.mp4, and the locationin which the data content is stored in the media segment is the 50^(th)to 1000^(th) bytes. Then, the address for acquiring the data content maybe http://www.example.com/server/Segments/seg-full-1.mp4/50-1000.Therefore, the terminal can acquire the data content from the server bysending the address for acquiring the data content to the server.

Step 470: Playing a picture of the region according to the data contentcorresponding to the region for the playback on the terminal.

In this embodiment of the present disclosure, a location in which datacontent corresponding to a region for playback on a terminal is storedin a media segment is acquired, and the data content is acquiredaccording to the storage location and from the media segment stored in aserver. Therefore, it is not required to independently store a partialvideo on the server, thereby saving a storage resource of the server.

As described in step 420, the MPD file may record the region informationof the region that can be independently decoded in the video. Thefollowing provides an example of an MPD file (hereinafter referred to asan MPD file 2) that records the region information. On the basis of theMPD file 1, the MPD file 2 has additional region information of theregion that can be independently decoded, with the region index numberof regionIdx=‘1’, and the MPD file 2 may be:

<MPD> ... <BaseURL>http://www.example.com/ server/Segments/</Base URL>... <!-Description of full-frame video--> <AdaptationSet  id=“FV”mimeType=‘video/mp4’ codecs=‘hev1’> <Representation id=‘R0’ width=‘1920’ height=‘1080’ frameRate=‘30’ bandwidth=‘256000’><SegmentList duration=‘10’> <SegmentURL media=‘seg-full-1.mp4’/><SegmentURL media=‘seg-full-2.mp4’/> ... </SegmentList></Representation> <Representation id=“R1” parentRepID=‘R0’ regionIdx=‘1’pos=‘400,100’, width=‘320’ height=‘480’ frameRate=‘30’bandwidth=‘64000’> <SegmentList duration=‘10’> <Segment URLmedia=‘seg-full-1.mp4’/> <SegmentURL media=‘seg-full-2.mp4’/> ...</SegmentList> </Representation> </AdaptationSet> ... </Period> </MPD>.

Furthermore, BaseURL indicates a base address of the video.Representation with id=‘R0’ does not include the region index number(regionIdx) of the region that can be independently decoded is notincluded, and therefore may be considered as information about an entirevideo picture. Representation with id=“R1” includes regionIdx=‘1’, andtherefore information included therein corresponds to region informationof the region that can be independently decoded with the region indexnumber of 1.

Representation with regionIdx=‘1’ includes the following information:parentRepID=‘R0’: This region that can be independently decoded belongsto a region in Representation with id=“R0”. That is, the Representationwith id=“R0” represents information about the entire video picture, andthe Representation with id=“R1” represents a region that can beindependently decoded and is identified as R1 in a video pictureidentified as R0. regionIdx=‘1’: A region index number of a region thatcan be independently decoded. pos=‘400,100’, width=‘320’, andheight=‘480’: location parameters of a region that can be independentlydecoded in the entire video picture. pos=‘400,100’ represents a pixellocation on the top left corner of a region that can be independentlydecoded, and width=‘320’ and height=‘480’ respectively represents awidth and a height of a region that can be independently decoded.Finally frameRate=‘30’ and bandwidth=‘64000’: a frame rate and abandwidth of a region that can be independently decoded.

In addition, the Representation with id=“R1” may also include aSegmentList. An address, recorded in the SegmentList, in which the mediasegment is stored in the video may be the same as an address, recordedin the SegmentList in the Representation with id=‘R0’, in which themedia segment is stored in the video.

In the MPD file 2, the region information of the region that can beindependently decoded is recorded in a form of Representation, which canbe compatible with a manner of recording video information in anexisting MPD.

It should be noted that the MPD file 2 is merely an example. Inpractice, the region information of the region that can be independentlydecoded may also be recorded in another form in an MPD file. Forexample, a new recording manner different from Representation isdedicatedly defined for the region that can be independently decoded.

In the prior art, a media segment may be further divided intosubsegments, and a subsegment includes at least one sample (one sampleis one photo, or is referred to as one frame of a picture). In this way,progressive downloading of the media segment performed by a terminal maybe by progressive downloading of video subsegments. It can be learnedfrom the foregoing description that the MPD file records an address foracquiring the media segment. To implement the progressive downloading ofthe media segment, the terminal needs to acquire, from the MPD file,only the address for acquiring the media segment. Likewise, to furtherimplement the progressive downloading of the video subsegments, theterminal needs to acquire only an address for acquiring the subsegments.

In the prior art, the server stores a segment index. The segment indexmay include a location in which each subsegment of the media segment isstored in the media segment. To implement progressive downloading of asubsegment, the terminal needs to first download a segment index fromthe server and then download the subsegment according to the segmentindex.

It should be noted that one photo or one frame of a video picturecorresponds to one sample. One subsample may refer to a section of datacontent that is in one sample and belongs to one region that can beindependently decoded. One sample may include N subsamples if a videopicture is divided into N regions that can be independently decoded.That is, a subsample corresponding to a region needs to be acquired froma media segment if data content corresponding to the region for playbackon the terminal needs to be acquired from the media segment.

An embodiment of the present disclosure introduces a subsample index onthe basis of the segment index. A location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment is jointly indicated by the segment index and thesubsample index. A specific procedure is shown in FIG. 5.

FIG. 5 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure. The method in FIG. 5 may beperformed by a terminal that plays a video. Steps 510, 520, 530, 540,580, and 590 are respectively the same as steps 410, 420, 430, 440, 460,and 470 in FIG. 4, and details are not described herein.

Step 510: Sending, to a server, a request for acquiring an MPD file of avideo.

Step 520: Receiving the MPD file sent by the server, where the MPD fileincludes region information of a region that can be independentlydecoded in the video.

Step 530: Determining, according to the region information, a regionused for playback on a terminal from the region that can beindependently decoded.

Step 540: Determining a to-be-acquired media segment according to theMPD file.

The media segment may include at least two subsegments.

Step 550: Acquiring, from the server, a segment index and a subsampleindex of the media segment, where the segment index is used to indicatea location in which each subsegment included in the media segment isstored in the media segment, and the subsample index is used to indicatea location in which each subsample corresponding to the region that canbe independently decoded is stored in each subsegment.

It should be understood that the subsample may be a section of datacontent in the subsegment, and in the subsegment, data contentcorresponding to the region for the playback on the terminal may includea subsample corresponding to the region.

It should be noted that the subsample index may include a location inwhich a subsample included in each subsegment in the media segment isstored in each subsegment, and a region that can be independentlydecoded and corresponds to the subsample included in each subsegment inthe media segment.

Furthermore, the subsample index may be defined using a Box structure.The following provides an example of a structure of a subsample index ofa media segment.

aligned(8) class SubsampleIndexBox extends FullBox(‘spix’, 0, 0) {unsigned int(32) subsegment_count; for (i=1; i <= subsegment_count; i++){ unsigned int(32) subsample_count; for (j=1; j <= subsample_count; j++){ unsigned int(8) region_index; unsigned int(24) byte_offset; unsignedint(24) subsample_size; } } }

In the structure of the subsample index ‘spix’ refer to subsample index,subsegment_count indicates a quantity of subsegments included in themedia segment, subsample_count indicates a quantity of subsamples in asubsegment i of the media segment, region_index is a region index numberof a region that can be independently decoded and corresponds to asubsample j in the subsegment i. byte_offset is an offset of a startlocation of the subsample j in the subsegment i relative to thesubsegment i. subsample_size is a size of the subsample j in thesubsegment i. Therefore, byte_offset and subsample_size can jointlyindicate a location in which the subsample j in the subsegment i isstored in the subsegment i. The location in which a subsample includedin each subsegment in the media segment is stored in each subsegment andthe region that can be independently decoded and corresponds to thesubsample may be acquired from the subsample index by means oftraversal.

Step 560: Determining a to-be-acquired subsegment according to thesegment index.

The to-be-acquired subsegment may be determined according to the segmentindex in a manner in the prior art, and details are not describedherein.

Step 570: Determining, according to a location in which the subsegmentis stored in the media segment and a location in which a subsamplecorresponding to the region for the playback on the terminal in theregion that can be independently decoded is stored in the subsegment,the location in which the data content corresponding to the region forthe playback on the terminal is stored in the media segment.

Furthermore, step 570 may include acquiring, according to a location inwhich the subsample corresponding to the region that can beindependently decoded is stored in the subsegment, the location in whichthe subsample corresponding to the region for the playback on theterminal is stored in the subsegment, adding a start location of thelocation in which the subsegment is stored in the media segment andstart and end locations of the location in which the subsamplecorresponding to the region for the playback on the terminal is storedin the subsegment in order to determine a start location of thesubsample corresponding to the region for the playback on the terminalin the media segment such that a location in which the subsamplecorresponding to the region for the playback on the terminal is storedin the media segment is further acquired according to the location inwhich the subsample corresponding to the region for the playback on theterminal is stored in the subsegment. The location in which thesubsample corresponding to the region for the playback on the terminalis stored in the media segment may be considered as the location inwhich the data content corresponding to the region for the playback onthe terminal is stored in the media segment.

For example, if the location in which the subsegment is stored in themedia segment is from 1000 to 10000, and the location in which thesubsample corresponding to the region for the playback on the terminalis stored in the subsegment is from 0 to 500, it can be obtained bycalculation that the location in which the subsample corresponding tothe region for the playback on the terminal is stored in the mediasegment is from 1000 to 1500.

Optionally, in an embodiment, the subsample index may also directlyindicate the location in which the data content corresponding to theregion for the playback on the terminal is stored in the media segment.In this case, step 570 may be replaced with the following. Acquiring,from the subsample index, a location in which the data content is storedin the media segment.

Step 580: Acquiring, according to the location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment, the data content corresponding to the region forthe playback on the terminal from the media segment stored in theserver.

Step 590: Playing a picture of the region according to the data contentcorresponding to the region for the playback on the terminal.

In this embodiment of the present disclosure, a subsample index isintroduced on the basis of an existing segment index, and a location inwhich data content corresponding to a region for playback on a terminalis stored in a media segment is jointly indicated based on the segmentindex and the subsample index such that the terminal may download thedata content from the server according to the location in which the datacontent is stored in the media segment, and display video contentcorresponding to the region for the playback on the terminal.

FIG. 6 is a schematic structural diagram of a segment index and asubsegment index. A media segment in FIG. 6 includes two subsegments, asubsegment 0 and a subsegment 1. Segment indexes of the media segmentinclude a segment index S₀ of the subsegment 0 and a segment index S₁ ofthe subsegment 1, where S₀ and S₁ record locations in which thesubsegment 0 and the subsegment 1 are stored in the media segmentrespectively. Subsample indexes include T₀ and T₁, where T₀ records alocation in which each subsample included in the subsegment 0 is storedin the subsegment 0 and a region that can be independently decoded andcorresponds to each subsample included in the subsegment 0, and T₁records a location in which each subsample included in the subsegment 1is stored in the subsegment 1 and a region that can be independentlydecoded and corresponds to each subsample included in the subsegment 1.T₀ includes T₀₀, T₀₁, T_(0m), and the like, where T₀₀, T₀₁, and T_(0m)respectively record locations in which a subsample 0, a subsample 1, anda subsample m in the subsegment 0 are stored in the subsegment 0 andtheir corresponding regions that can be independently decoded. T₁includes T₁₀, T₁₁, T_(1m), and the like, where T₁₀, T₁₁, and T_(1m)respectively record locations in which a subsample 0, a subsample 1, anda subsample m in the subsegment 1 are stored in the subsegment 1 andtheir corresponding regions that can be independently decoded. It can bealso learned from FIG. 6 that a subsample may be a section of datacontent in a sample. For example, the subsample 0 and the subsample 1are both a section of data content in a sample 1 in the subsegment 1,and the subsample m is a section of data content in a sample 2 in thesubsegment 1.

In step 550, the terminal acquires, from the server, a segment index anda subsample index of the media segment. In the prior art, the segmentindex may be stored in the server in the following three manners.Correspondingly, the subsample index may also be stored in threemanners. A specific description is as follows.

Manner 1: The segment index may be located in a header of the mediasegment. That is, content of the media segment includes a segment indexof the media segment and video content corresponding to the mediasegment, where the segment index of the media segment is stored in aheader of the media segment. Furthermore, the manner in which serveracquires the segment index of the media segment may include that theterminal downloads first N bytes of which the first address is anaddress for acquiring the media segment, where the first N bytes includea parameter of a quantity M of bytes that is used to indicate a size ofthe segment index, acquires, from content of the downloaded N bytes, thequantity M of bytes that is used to indicate the size of the segmentindex, determines, according to a relationship between M and N, whetherthe segment index is downloaded completely, acquires the segment indexfrom the content of the downloaded N bytes when M is less than N, ordownloads the (N+1)^(th) to M^(th) bytes of the media segment from theserver according to the address for acquiring the media segment when Mis greater than N. As an example, in an existing box structure, fourbytes of start content of the media segment shows a size of a box of thesegment index. The terminal may download 1K bytes of the media segmentfrom the server and acquire the size of the segment index from the 1Kbytes. The segment index can be acquired from the 1K bytes when the sizeof the segment index is less than the 1K bytes, and the terminalcontinues to download remaining bytes of the segment index from theserver when the size of the segment index is greater than the 1K bytes.For example, when it is assumed that the size of the segment index is900 bytes, the segment index can be acquired by extracting the 0^(th) to900^(th) bytes from the previous 1K bytes, and when it is assumed thatthe size of the segment index is 1050 bytes, the complete segment indexcan be acquired by continuing to download the 1001^(st) to 1050^(th)bytes from the server.

On the basis of manner 1, in an embodiment, the content of the mediasegment may further include a subsample index. Referring to FIG. 7, asegment index and a subsample index precede media content correspondingto the media segment, and the subsample index follows the segment index.That is, the segment index and the subsample index are both located in aheader of the media segment, and the subsample index is adjacent to thesegment index. Therefore, step 550 may include acquiring, according toan address for acquiring the media segment, the segment index and thesubsample index that are located in the header of the media segment. Itshould be noted that the subsample index is adjacent to the segmentindex may refer to that the segment index and the subsample index arelocated in a segment of consecutive addresses. For example, the segmentindex is located from the 0^(th) byte to the 1000^(th) byte and thesubsample index is located from the 1001^(st) byte to the 2000^(th)byte. A manner of downloading the subsample index and a manner ofdownloading the segment index are both based on a box structure.Furthermore, acquiring, according to an address for acquiring the mediasegment, the segment index and the subsample index that are located inthe header of the media segment may include downloading first N bytes ofwhich the first address is the address for acquiring the media segment,where the first N bytes include a parameter of a quantity M of bytesthat is used to indicate a size of the segment index, acquiring, fromcontent of the downloaded N bytes, the quantity M of bytes that is usedto indicate the size of the segment index, determining, according to arelationship between M and N, whether the segment index is downloadedcompletely, acquiring the segment index from the content of thedownloaded N bytes when M is less than N, and downloading the (N+1)^(th)to M^(th) bytes of content of the media segment from the serveraccording to the address for acquiring the media segment when M isgreater than or equal to N, downloading first T bytes that begin withthe (M+1)^(th) byte of the media segment, where the first T bytesinclude a parameter of a quantity Q of bytes that is used to indicate asize of the subsample index, acquiring, from content of the downloaded Tbytes, the quantity Q of bytes that is used to indicate the size of thesubsample index, determining, according to a relationship between T andQ, whether the subsample index is downloaded completely, acquiring thesubsample index from the content of the downloaded T bytes when Q isless than T, and downloading the (T+1)^(th) to Q^(th) bytes of contentof the media segment from the server according to the address foracquiring the media segment when Q is greater than or equal to T.

Manner 2: The media segment includes at least two sections, where eachsection includes at least one subsegment. The segment index includes afirst index and a second index. A header of each section includes onesecond index and one subsample index adjacent to the second index. Thefirst index is located in a header of the media segment and used toindicate a start location of each second index of the media segment inthe media segment. The second index is used to indicate a location inwhich a subsegment of a section in which the second index is located isstored in the media segment.

Therefore, for manner 2, step 550 may include acquiring, according to anaddress for acquiring the media segment, the first index located in theheader of the media segment, and acquiring each second index and asubsample index adjacent to each second index according to the startlocation, indicated by the first index, of each second index in themedia segment. Furthermore, the first index, the second index, and thesubsample index all can use the box structure. Downloading, according toan address for acquiring the media segment, the first index located inthe header of the media segment may include downloading first N₁ bytesof which the first address is the address for acquiring the mediasegment, where the first N₁ bytes include a parameter of a quantity M₁of bytes that is used to indicate a size of the first index, acquiring,from content of the downloaded N₁ bytes, the quantity M₁ of bytes thatis used to indicate the size of the segment index, determining,according to a relationship between M₁ and N₁, whether the first indexis downloaded completely, acquiring the first index from the content ofthe downloaded N₁ bytes when M₁ is less than N₁, and downloading the(N₁+1)^(th) to M_(ith) bytes of content of the media segment from theserver according to the address for acquiring the media segment when M₁is greater than or equal to N₁. After a start location of each secondindex in the media segment is found, a manner of downloading each secondindex and a subsample index corresponding to each second index is thesame as a manner of downloading a segment index and a subsample index inmanner 1, and details are not described herein.

As an example, a media segment in FIG. 8 is divided into three sections,where a first index is located in a header of the media segment. Asecond index 1, a second index 2, and a second index 3 are respectivelylocated in headers of a section 1, a section 2, and a section 3. Thesecond index 1 indicates a location in which a subsegment in the section1 is stored in the media segment, the second index 2 indicates alocation in which a subsegment in the section 2 is stored in the mediasegment, and the second index 3 indicates a location in which asubsegment in the section 3 is stored in the media segment. Subsampleindexes 1 to 3 correspond to the second indexes 1 to 3 respectively andare adjacent to the second indexes 1 to 3 respectively. The subsampleindex 1 indicates a location in which a subsample in the section 1 islocated in a subsegment to which the subsample belongs. The subsampleindex 2 indicates a location in which a subsample in the section 2 islocated in a subsegment to which the subsample belongs. The subsampleindex 3 indicates a location in which a subsample in the section 3 islocated in a subsegment to which the subsample belongs. During actualdownloading, the terminal first downloads the first index, separatelyfinds start locations of the second indexes 1 to 3 according to anindication of the first index, and then separately downloads the secondindexes and the subsample indexes of the section 1 to the section 3.

Manner 3: The segment index of the media segment is located in an indexsegment of the media segment. The index segment herein is dedicatedlyused to store the segment index of the media segment. In this manner,the MPD file may record a correspondence between an address foracquiring the media segment and an address for acquiring the indexsegment. The address for acquiring an index segment corresponding to amedia segment is first found from the MPD file when the segment index ofthe media segment needs to be downloaded, and then the segment index maybe downloaded using the box structure.

On the basis of manner 3, a subsample index is added to the indexsegment. The index segment is dedicatedly used to store the segmentindex and the subsample index of the media segment. The segment indexand the subsample index are located in the index segment, and thesubsample index is adjacent to the segment index. Step 550 may includeacquiring, according to an address for acquiring the index segment, thesegment index and the subsample index that are located in the indexsegment. Furthermore, acquiring, according to an address for acquiringthe index segment, the segment index and the subsample index that arelocated in a header of the index segment may include downloading first Nbytes of the index segment according to the address for acquiring theindex segment, where the first N bytes include a parameter of a quantityM of bytes that is used to indicate a size of the segment index,acquiring, from content of the downloaded N bytes, the quantity M ofbytes that is used to indicate the size of the segment index,determining, according to a relationship between M and N, whether thesegment index is downloaded completely, acquiring the segment index fromthe content of the downloaded N bytes when M is less than N, downloadingthe (N+1)^(th) to M^(th) bytes of content of the index segment from theserver according to the address for acquiring the index segment when Mis greater than or equal to N, downloading first T bytes that begin withthe (M+1)^(th) byte of the index segment, where the first T bytesinclude a parameter of a quantity Q of bytes that is used to indicate asize of the subsample index, acquiring, from content of the downloaded Tbytes, the quantity Q of bytes that is used to indicate the size of thesubsample index, determining, according to a relationship between T andQ, whether the subsample index is downloaded completely, acquiring thesubsample index from the content of the downloaded T bytes when Q isless than T, or downloading the (T+1)^(th) to Q^(th) bytes of content ofthe index segment from the server according to the address for acquiringthe index segment when Q is greater than or equal to T.

It should be noted that the terminal may make an agreement with theserver in advance on a manner, among the foregoing three manners, ofstoring the segment index and the subsample index. Further, the terminalmay first determine a manner of storing the segment index and thesubsample index and then download the segment index and the subsampleindex. The terminal first parses an MPD file, and determines that manner3 is to be used by the server to store the segment index when acorrespondence between an address for acquiring a media segment and anaddress for acquiring an index segment is recorded in the MPD file. Theterminal may use the following procedure to determine whether manner 1or manner 2 is used by the server to store the segment index when acorrespondence between an address for acquiring a media segment and anaddress for acquiring an index segment is not recorded in the MPD file.First N bytes of which the first address is an address for acquiring themedia segment are downloaded, where the first N bytes include aparameter that is used to indicate a manner of storing a segment index,and the parameter is used to indicate whether the segment index and thesubsample index of the media segment are both stored in a header of themedia segment (corresponding to manner 1) or distributed in differentsections of the media segment (corresponding to manner 2). The parameteris acquired from the downloaded N bytes, and the manner of storing thesegment index of the media segment is determined according to anindication of the parameter. For example, the parameter is referencetype, first N bytes of the media segment are downloaded, and a value ofreference type is acquired from the downloaded N bytes. The serverstores the segment index of the media segment in manner 2 if referencetype=1, or the server stores the segment index of the media segment inmanner 1 if reference type is not equal to 1.

In the foregoing description, a location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment is jointly indicated by the segment index and thesubsample index. However, this embodiment of the present disclosure isnot limited thereto. Furthermore, the location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment may be directly recorded in the MPD file, and acorrespondence between the region for the playback on the terminal andthe location in which the data content corresponding to the region isstored in the media segment is recorded in the MPD file. For details,refer to FIG. 9.

FIG. 9 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure. The method in FIG. 9 may beperformed by a terminal that plays a video. Steps 910, 920, 930, 940,960, and 970 of the method in FIG. 9 are same as the steps 410, 420,430, 440, 460, and 470 in FIG. 4 respectively, and details are notdescribed herein.

Step 910: Sending, to a server, a request for acquiring an MPD file of avideo.

Step 920: Receiving the MPD file sent by the server, where the MPD fileincludes region information of a region that can be independentlydecoded in the video.

Step 930: Determining, according to the region information, a regionused for playback on a terminal from the region that can beindependently decoded.

Step 940: Determining a to-be-acquired media segment according to theMPD file.

Step 950: Acquiring, from the MPD file according to the region for theplayback on the terminal and a correspondence that is included in theMPD file and is between the region and the location in which the datacontent corresponding to the region is stored in the media segment, thelocation in which the data content is stored in the media segment.

The following provides an example of an MPD file (hereinafter referredto as an MPD file 3) that records a location in which data contentcorresponding to a region that can be independently decoded is stored inthe media segment.

<MPD> ... <BaseURL>http://www.example.com/ server/Segments/</BaseURL>... <Representation id=“R1”  parentRepID=‘R0’ regionIdx=‘1’ pos=‘0,0’,width=‘960’ height=‘540’ frameRate=‘30’ bandwidth=‘64000’> <SegmentListduration=‘10’> <Segment URL media=‘seg-full-1.mp4’/> <regionrange=‘0,12000’> <region range=‘28000,35000’> ... </SegmentList></Representation> ... </MPD>

In the MPD file 3, the region range indicates a byte range of the datacontent that is in the media segment (hereinafter referred to as a mediasegment A) corresponding to ‘seg-full-1.mp4’ and corresponds to aregion, whose regionIdx (region index number) is 1, (hereinafterreferred to as a region 1) that can be independently decoded. That is,the terminal needs to find, from the MPD file 3, a correspondencebetween the region 1 and the byte range of the data contentcorresponding to the region 1 in the media segment A if the terminalneeds to acquire a location in which the data content corresponding tothe region 1 is stored in the media segment A, and then acquire theregion range corresponding to the media segment A. It should be notedthat, in the MPD file 3, a location in which data content correspondingto a region that can be independently decoded is stored in a mediasegment is indicated by a byte range, but this embodiment of the presentdisclosure is not limited thereto. For example, a location in which datacontent is stored in a media segment may also be indicated by means ofcombining a size of the data content and an offset between a startlocation of the data content and a start location of the media segment.

Step 960: Acquiring, according to the location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment, the data content corresponding to the region forthe playback on the terminal from the media segment stored in theserver.

Furthermore, when it is assumed that the MPD file records an address foracquiring the media segment:http://www.example.com/server/Segments/seg-full-1.mp4, the followinglocation in which the data content corresponding to the region for theplayback on the terminal is stored in the media segment is acquired byperforming step 940, region range=‘0,12000’ and regionrange=‘28000,35000’. To acquire the data content, the terminal needs todownload only the data content from the server using addresseshttp://www.example.com/server/Segments/seg-full-1.mp4/0-12000 andhttp://www.example.com/server/Segments/seg-full-1.mp4/28000-35000.

Step 970: Playing a picture of the region according to the data contentcorresponding to the region for the playback on the terminal.

In this embodiment of the present disclosure, a location in which datacontent corresponding to a region for playback on the terminal is storedin a media segment is stored in an MPD file such that the data contentcorresponding to the region can be flexibly downloaded from a serveraccording to the storage location, an objective of acquiring a partialvideo without additional storage of the partial video on the server isachieved, and a storage resource of the server is saved.

The foregoing describes in detail the video processing methods in theembodiments of the present disclosure from a perspective of a terminal.The following describes a video processing method in an embodiment ofthe present disclosure from a perspective of a server.

It should be understood that interaction between a terminal and aserver, related features, functions, and the like that are described onthe server side correspond to descriptions on the terminal side. Forbrevity, a repeated description is omitted appropriately.

FIG. 10 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure. The method in FIG. 10 may beperformed by a server. The method in FIG. 10 includes the followingsteps.

Step 1010: Receiving a request, sent by a terminal, for acquiring an MPDfile of a video, and send the MPD file of the video to a terminalaccording to the request, sent by the terminal, for acquiring the MPDfile of the video, where the MPD file includes region information of aregion that can be independently decoded in the video.

Step 1020: Receiving a location, sent by the terminal, in which datacontent corresponding to a region used for playback on the terminal isstored in the media segment of the video, where the region for theplayback on the terminal is determined by the terminal according to theregion information and from the region that can be independentlydecoded.

Step 1030: Sending, to the terminal according to the location in whichthe data content corresponding to the region for the playback on theterminal is stored in the media segment, the data content that is storedin the media segment and corresponds to the location in which the datacontent is stored in the media segment, where the data contentcorresponding to the region for the playback on the terminal is used forthe terminal to play a picture of the region.

In this embodiment of the present disclosure, a location in which datacontent corresponding to a region for playback on a terminal is storedin a media segment is acquired, and the data content is downloadedaccording to the storage location and from content of the media segmentstored in a server. Therefore, it is not required to independently storea partial video on the server, thereby saving a storage resource of theserver.

Optionally, in an embodiment, before receiving a location, sent by theterminal, in which data content corresponding to a region used forplayback on the terminal is stored in the media segment of the video,the method in FIG. 10 may further include receiving acquiringinformation sent by the terminal, where the acquiring information isused for acquiring a segment index and a subsample index of the mediasegment, the segment index is used to indicate a location in which eachsubsegment included in the media segment is stored in the media segment,the subsample index is used to indicate a location in which eachsubsample corresponding to the region that can be independently decodedis stored in each subsegment, and the location in which each subsamplecorresponding to the region that can be independently decoded is storedin each subsegment and the location in which each subsegment is storedin the media segment are used to determine the location in which thedata content corresponding to the region for the playback on theterminal is stored in the media segment, and sending the segment indexand the subsample index to the terminal according to the acquiringinformation.

Optionally, in another embodiment, the segment index and the subsampleindex are both located in a header of the media segment, the subsampleindex is adjacent to the segment index, and the segment index and thesubsample index are acquired from the server.

Optionally, in another embodiment, the media segment includes at leasttwo sections, each section includes at least one subsegment, the segmentindex includes a first index and a second index, and a header of eachsection includes one second index and one subsample index adjacent tothe second index. The first index is located in a header of the mediasegment and used to indicate a start location of each second index ofthe media segment in the media segment, and the second index is used toindicate a location in which a subsegment of a section in which thesecond index is located is stored in the media segment.

Optionally, in another embodiment, the MPD file includes acorrespondence between an address for acquiring the media segment and anaddress for acquiring an index segment, the index segment is dedicatedlyused to store the segment index and the subsample index of the mediasegment, and in the index segment, the subsample index is adjacent tothe segment index.

Optionally, in another embodiment, the MPD file includes acorrespondence between the region for the playback on the terminal andthe location in which the data content corresponding to the region isstored in the media segment.

It should be noted that the server in FIG. 10 may perform any actionperformed by a server in FIG. 4 to FIG. 9.

The foregoing describes in detail the video processing methods in theembodiments of the present disclosure with reference to FIG. 1 to FIG.10. The following describes in detail a terminal and a server inembodiments of the present disclosure with reference to FIG. 11 to FIG.14.

FIG. 11 is a schematic block diagram of a terminal according to anembodiment of the present disclosure. The terminal 1100 in FIG. 11includes a sending unit 1110, a receiving unit 1120, a first determiningunit 1130, a second determining unit 1140, a first acquiring unit 1150,a second acquiring unit 1160, and a playback unit 1170. It should benoted that the terminal 1100 can implement steps performed by a terminalin FIG. 1 to FIG. 10, and to avoid repetition, a repeated description isomitted appropriately.

The sending unit 1110 is configured to send, to a server, a request foracquiring an MPD file of a video.

The receiving unit 1120 is configured to receive the MPD file sent bythe server, where the MPD file includes region information of a regionthat can be independently decoded in the video.

The first determining unit 1130 is configured to determine, according tothe region information included in the MPD file received by thereceiving unit 1120, a region used for playback on the terminal 1100from the region that can be independently decoded.

The second determining unit 1140 is configured to determine ato-be-acquired media segment according to the MPD file received by thereceiving unit 1120.

The first acquiring unit 1150 is configured to acquire a location inwhich data content corresponding to the region, determined by the firstdetermining unit 1130, for the playback on the terminal 1100 is storedin the media segment determined by the second determining unit 1140,where the data content is used for playing a picture of the region.

The second acquiring unit 1160 is configured to acquire, according tothe location, acquired by the first acquiring unit 1150, in which thedata content corresponding to the region for the playback on theterminal 1100 is stored in the media segment, the data contentcorresponding to the region for the playback on the terminal 1100 fromthe media segment stored in the server.

The playback unit 1170 is configured to play, according to the datacontent that is acquired by the second acquiring unit 1160 andcorresponds to the region for the playback on the terminal 1100, apicture of the region for the playback on the terminal 1100.

In this embodiment of the present disclosure, a location in which datacontent corresponding to a region for playback on a terminal is storedin a media segment is acquired, and the data content is acquiredaccording to the storage location and from the media segment stored in aserver. Therefore, it is not required to independently store a partialvideo on the server, thereby saving a storage resource of the server.

Optionally, in an embodiment, the media segment includes at least twosubsegments, and the first acquiring unit 1150 is further configured toacquire, from the server, a segment index and a subsample index of themedia segment, where the segment index is used to indicate a location inwhich each subsegment included in the media segment is stored in themedia segment, and the subsample index is used to indicate a location inwhich each subsample corresponding to the region that can beindependently decoded is stored in each subsegment, determine ato-be-acquired subsegment according to the segment index, and determine,according to a location in which the subsegment is stored in the mediasegment and a location in which a subsample corresponding to the regionfor the playback on the terminal 1100 in the region that can beindependently decoded is stored in the subsegment, the location in whichthe data content corresponding to the region for the playback on theterminal 1100 is stored in the media segment.

Optionally, in another embodiment, the segment index and the subsampleindex are both located in a header of the media segment, and thesubsample index is adjacent to the segment index, and the firstacquiring unit 1150 acquiring, from the server, a segment index and asubsample index of the media segment further includes acquiring,according to an address for acquiring the media segment, the segmentindex and the subsample index that are located in the header of themedia segment.

Optionally, in another embodiment, the media segment includes at leasttwo sections, each section includes at least one subsegment, the segmentindex includes a first index and a second index, and a header of eachsection includes one second index and one subsample index adjacent tothe second index. The first index is located in a header of the mediasegment and used to indicate a start location of each second index ofthe media segment in the media segment. The second index is used toindicate a location in which a subsegment of a section in which thesecond index is located is stored in the media segment, and the firstacquiring unit 1150 acquiring, from the server, a segment index and asubsample index of the media segment further includes acquiring,according to an address for acquiring the media segment, the first indexlocated in the header of the media segment, and acquiring each secondindex and a subsample index adjacent to each second index according tothe start location, indicated by the first index, of each second indexin the media segment.

Optionally, in another embodiment, the MPD file includes acorrespondence between the address for acquiring a media segment and anaddress for acquiring an index segment, the index segment is dedicatedlyused to store the segment index and the subsample index of the mediasegment, and in the index segment, the sub sample index is adjacent tothe segment index, and the first acquiring unit 1150 acquiring, from theserver, a segment index and a subsample index of the media segmentfurther includes acquiring, from the MPD file according to thecorrespondence between the address for acquiring the media segment andthe address for acquiring the index segment, the address for acquiringthe index segment corresponding to the address for acquiring the mediasegment, and acquiring the segment index and the subsample indexaccording to the address for acquiring the index segment.

Optionally, in another embodiment, the MPD file includes acorrespondence between the region for the playback on the terminal 1100and the location in which the data content corresponding to the regionfor the playback on the terminal 1100 is stored in the media segment,and the first acquiring unit 1150 acquires, from the server, a segmentindex and a subsample index of the media segment further includesacquiring, from the MPD file according to the region for the playback onthe terminal 1100 and the correspondence between the region for theplayback on the terminal 1100 and the location in which the data contentcorresponding to the region for the playback on the terminal 1100 isstored in the media segment, the location in which the data content isstored in the media segment.

Optionally, in another embodiment, the second acquiring unit 1160 isfurther configured to determine, according to the address for acquiringthe media segment and the location in which the data content is storedin the media segment, an address, acquired from the MPD file, foracquiring the data content, where the address for acquiring the datacontent includes the address for acquiring the media segment and thelocation in which the data content is stored in the media segment, sendthe address for acquiring the data content to the server, and receivethe data content that is sent by the server and corresponds to theaddress for acquiring the data content.

Optionally, in another embodiment, the first determining unit 1130 isfurther configured to present, to a user of the terminal 1100 accordingto the region information, the region that can be independently decoded,and determine, as the region for the playback on the terminal 1100, aregion selected by the user from the region that can be independentlydecoded, or determine, as the region for the playback on the terminal1100 according to the region information, a region that matches acapability of the terminal 1100 and is in the region that can beindependently decoded.

FIG. 12 is a schematic block diagram of a server according to anembodiment of the present disclosure. The server 1200 in FIG. 12includes a receiving unit 1210, a storage unit 1220, and a sending unit1230. It should be noted that the server 1200 can implement stepsperformed by a server in FIG. 1 to FIG. 10, and to avoid repetition, arepeated description is omitted appropriately.

The receiving unit 1210 is configured to receive a request, sent by aterminal, for acquiring an MPD file of a video.

The storage unit 1220 is configured to store the MPD file of the video.

The sending unit 1230 is configured to send the MPD file, stored in thestorage unit 1220, of the video to the terminal according to therequest, sent by the terminal, for acquiring the MPD file of the video,where the MPD file includes region information of a region that can beindependently decoded in the video.

The receiving unit 1210 is further configured to receive a location,sent by the terminal, in which data content corresponding to a regionused for playback on the terminal is stored in the media segment of thevideo, where the region for the playback on the terminal is determinedby the terminal according to the region information and from the regionthat can be independently decoded.

The storage unit 1220 is further configured to store media segments ofthe video.

The sending unit 1230 is further configured to send, to the terminalaccording to the location, received by the receiving unit 1210, in whichthe data content corresponding to the region for the playback on theterminal is stored in the media segment, the data content that is storedby the storage unit 1220 in the media segment and corresponds to thelocation in which the data content is stored in the media segment, wherethe data content corresponding to the region for the playback on theterminal is used for the terminal to play a picture of the region.

In this embodiment of the present disclosure, a location in which datacontent corresponding to a region for playback on a terminal is storedin a media segment is acquired, and the data content is downloadedaccording to the storage location and from content of the media segmentstored in a server. Therefore, it is not required to independently storea partial video on the server, thereby saving a storage resource of theserver.

Optionally, in an embodiment, the media segment includes at least twosubsegments, the receiving unit 1210 is further configured to receiveacquiring information sent by the terminal, where the acquiringinformation is used for acquiring a segment index and a subsample indexof the media segment, the segment index is used to indicate a locationin which each subsegment included in the media segment is stored in themedia segment, the subsample index is used to indicate a location inwhich each subsample corresponding to the region that can beindependently decoded is stored in each subsegment, and the location inwhich each subsample corresponding to the region that can beindependently decoded is stored in each subsegment and the location inwhich each subsegment is stored in the media segment are used todetermine the location in which the data content corresponding to theregion for the playback on the terminal is stored in the media segment.

The storage unit 1220 is further configured to store the segment indexand the subs ample index.

The sending unit 1230 is further configured to send the segment indexand the subsample index to the terminal according to the acquiringinformation.

FIG. 13 is a schematic block diagram of a terminal according to anembodiment of the present disclosure. The terminal 1300 in FIG. 13includes a transmitter 1310, a receiver 1320, a processor 1330, and aplayer 1340. It should be noted that the terminal 1300 can implementsteps performed by a terminal in FIG. 1 to FIG. 10, and to avoidrepetition, a repeated description is omitted appropriately.

The transmitter 1310 is configured to send, to a server, a request foracquiring an MPD file of a video.

The receiver 1320 is configured to receive the MPD file sent by theserver, where the MPD file includes region information of a region thatcan be independently decoded in the video.

The processor 1330 is configured to determine, according to the regioninformation included in the MPD file received by the receiver 1320, aregion used for playback on the terminal 1300 from the region that canbe independently decoded, determine a to-be-acquired media segmentaccording to the MPD file, acquire a location in which data contentcorresponding to the region for the playback on the terminal 1300 isstored in the media segment, where the data content is used for playinga picture of the region, and acquire, according to the location in whichthe data content corresponding to the region for the playback on theterminal 1300 is stored in the media segment, the data contentcorresponding to the region for the playback on the terminal 1300 fromthe media segment stored in the server.

The player 1340 is configured to play, according to the data contentthat is acquired by the processor 1330 and corresponds to the region forthe playback on the terminal 1300, a picture of the region for theplayback on the terminal 1300.

In this embodiment of the present disclosure, a location in which datacontent corresponding to a region for playback on a terminal is storedin a media segment is acquired, and the data content is acquiredaccording to the storage location and from the media segment stored in aserver. Therefore, it is not required to independently store a partialvideo on the server, thereby saving a storage resource of the server.

Optionally, in an embodiment, the media segment includes at least twosubsegments, the processor 1330 is further configured to acquire, fromthe server, a segment index and a subsample index of the media segment,where the segment index is used to indicate a location in which eachsubsegment included in the media segment is stored in the media segment,and the subsample index is used to indicate a location in which eachsubsample corresponding to the region that can be independently decodedis stored in each subsegment, determine a to-be-acquired subsegmentaccording to the segment index, and determine, according to a locationin which the subsegment is stored in the media segment and a location inwhich a subsample corresponding to the region for the playback on theterminal 1300 in the region that can be independently decoded is storedin the subsegment, the location in which the data content correspondingto the region for the playback on the terminal 1300 is stored in themedia segment.

Optionally, in another embodiment, the segment index and the subsampleindex are both located in a header of the media segment, and thesubsample index is adjacent to the segment index, and the processor 1330is further configured to acquire, according to an address for acquiringthe media segment, the segment index and the subsample index that arelocated in the header of the media segment.

Optionally, in another embodiment, the media segment includes at leasttwo sections, each section includes at least one subsegment, the segmentindex includes a first index and a second index, and a header of eachsection includes one second index and one subsample index adjacent tothe second index. The first index is located in a header of the mediasegment and used to indicate a start location of each second index ofthe media segment in the media segment. The second index is used toindicate a location in which a subsegment of a section in which thesecond index is located is stored in the media segment, and theprocessor 1330 is further configured to acquire, according to an addressfor acquiring the media segment, the first index located in the headerof the media segment, and acquire each second index and a subsampleindex adjacent to each second index according to the start location,indicated by the first index, of each second index in the media segment.

Optionally, in another embodiment, the MPD file includes acorrespondence between an address for acquiring the media segment and anaddress for acquiring an index segment, the index segment is dedicatedlyused to store the segment index and the subsample index of the mediasegment, and in the index segment, the sub sample index is adjacent tothe segment index, and the processor 1330 is further configured toacquire, from the MPD file according to the correspondence between theaddress for acquiring the media segment and the address for acquiringthe index segment, the address for acquiring the index segmentcorresponding to the address for acquiring the media segment, andacquire the segment index and the subsample index according to theaddress for acquiring the index segment.

Optionally, in another embodiment, the MPD file includes acorrespondence between the region for the playback on the terminal 1300and the location in which the data content corresponding to the regionfor the playback on the terminal 1300 is stored in the media segment,and the processor 1330 is further configured to acquire, from the MPDfile according to the region for the playback on the terminal 1300 andthe correspondence between the region for the playback on the terminal1300 and the location in which the data content corresponding to theregion for the playback on the terminal 1300 is stored in the mediasegment, the location in which the data content is stored in the mediasegment.

Optionally, in another embodiment, the processor 1330 is furtherconfigured to determine, according to the address for acquiring themedia segment and the location in which the data content is stored inthe media segment, an address, acquired from the MPD file, for acquiringthe data content, where the address for acquiring the data contentincludes the address for acquiring the media segment and the location inwhich the data content is stored in the media segment, send the addressfor acquiring the data content to the server, and receive the datacontent that is sent by the server and corresponds to the address foracquiring the data content.

Optionally, in another embodiment, the processor 1330 is furtherconfigured to present, to a user of the terminal 1300 according to theregion information, the region that can be independently decoded, anddetermine, as the region for the playback on the terminal 1300, a regionselected by the user from the region that can be independently decoded,or determine, as the region for the playback on the terminal 1300according to the region information, a region that matches a capabilityof the terminal 1300 and is in the region that can be independentlydecoded.

FIG. 14 is a schematic block diagram of a server according to anembodiment of the present disclosure. The server 1400 in FIG. 14includes a transmitter 1410, a receiver 1430, and a memory 1420. Itshould be noted that the server 1400 can implement steps performed by aserver in FIG. 1 to FIG. 10, and to avoid repetition, a repeateddescription is omitted appropriately.

The transmitter 1410 is configured to send an MPD file of a video to aterminal according to a request, sent by the terminal, for acquiring theMPD file of the video, where the MPD file includes region information ofa region that can be independently decoded in the video.

The receiver 1430 is configured to receive a location, sent by theterminal, in which data content corresponding to a region used forplayback on the terminal is stored in the media segment of the video,where the region for the playback on the terminal is determined by theterminal according to the region information and from the region thatcan be independently decoded.

The memory 1420 is configured to store the MPD file of the video andmedia segments of the video.

The transmitter 1410 is further configured to send, to the terminalaccording to the location, received by the receiver 1430, in which thedata content corresponding to the region for the playback on theterminal is stored in the media segment, the data content that is storedin the media segment and corresponds to the location in which the datacontent is stored in the media segment, where the data contentcorresponding to the region for the playback on the terminal is used forthe terminal to play a picture of the region.

In this embodiment of the present disclosure, a location in which datacontent corresponding to a region for playback on a terminal is storedin a media segment is acquired, and the data content is downloadedaccording to the storage location and from content of the media segmentstored in a server. Therefore, it is not required to independently storea partial video on the server, thereby saving a storage resource of theserver.

Optionally, in an embodiment, the media segment includes at least twosubsegments, and the receiver 1430 is further configured to receiveacquiring information sent by the terminal, where the acquiringinformation is used for acquiring a segment index and a subsample indexof the media segment, the segment index is used to indicate a locationin which each subsegment included in the media segment is stored in themedia segment, the subsample index is used to indicate a location inwhich each subsample corresponding to the region that can beindependently decoded is stored in each subsegment, and the location inwhich each subsample corresponding to the region that can beindependently decoded is stored in each subsegment and the location inwhich each subsegment is stored in the media segment are used todetermine the location in which the data content corresponding to theregion for the playback on the terminal is stored in the media segment,and send the segment index and the subsample index to the terminalaccording to the acquiring information.

The memory 1420 is further configured to store the segment index and thesubsample index of the video.

A person of ordinary skill in the art may be aware that, in combinationwith the examples described in the embodiments disclosed in thisspecification, units and algorithm steps may be implemented byelectronic hardware or a combination of computer software and electronichardware. Whether the functions are performed by hardware or softwaredepends on particular applications and design constraint conditions ofthe technical solutions. A person skilled in the art may use differentmethods to implement the described functions for each particularapplication, but it should not be considered that the implementationgoes beyond the scope of the present disclosure.

It may be clearly understood by a person skilled in the art that, forthe purpose of convenient and brief description, for a detailed workingprocess of the foregoing system, apparatus, and unit, reference may bemade to a corresponding process in the foregoing method embodiments, anddetails are not described herein.

In the several embodiments provided in the present application, itshould be understood that the disclosed system, apparatus, and methodmay be implemented in other manners. For example, the describedapparatus embodiment is merely exemplary. For example, the unit divisionis merely logical function division and may be other division in actualimplementation. For example, a plurality of units or components may becombined or integrated into another system, or some features may beignored or not performed. In addition, the displayed or discussed mutualcouplings or direct couplings or communication connections may beimplemented using some interfaces. The indirect couplings orcommunication connections between the apparatuses or units may beimplemented in electronic, mechanical, or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one position, or may be distributed on a plurality ofnetwork units. Some or all of the units may be selected according toactual needs to achieve the objectives of the solutions of theembodiments.

In addition, functional units in the embodiments of the presentdisclosure may be integrated into one processing unit, or each of theunits may exist alone physically, or two or more units are integratedinto one unit.

When the functions are implemented in the form of a software functionalunit and sold or used as an independent product, the functions may bestored in a computer-readable storage medium. Based on such anunderstanding, the technical solutions of the present disclosureessentially, or the part contributing to the prior art, or some of thetechnical solutions may be implemented in a form of a software product.The software product is stored in a storage medium, and includes severalinstructions for instructing a computer device (which may be a personalcomputer, a server, or a network device) to perform all or some of thesteps of the methods described in the embodiments of the presentdisclosure. The foregoing storage medium includes any medium that canstore program code, such as a universal serial bus (USB) flash drive, aremovable hard disk, a read-only memory (ROM), a random access memory(RAM), a magnetic disk, or an optical disc.

The foregoing descriptions are merely specific implementation manners ofthe present disclosure, but are not intended to limit the protectionscope of the present disclosure. Any variation or replacement readilyfigured out by a person skilled in the art within the technical scopedisclosed in the present disclosure shall fall within the protectionscope of the present disclosure. Therefore, the protection scope of thepresent disclosure shall be subject to the protection scope of theclaims.

What is claimed is:
 1. A video processing method, comprising: sending,to a server, a request for acquiring a media presentation description(MPD) file of a video; receiving the MPD file from the server, the MPDfile comprising region information of a region that can be independentlydecoded in the video; determining, according to the region information,a region used for playback on a terminal from the region that can beindependently decoded; determining a to-be-acquired media segmentaccording to the MPD file; acquiring a location in which data contentcorresponding to the region for the playback on the terminal is storedin the media segment by: acquiring, from the server, a segment index ofthe media segment, the segment index indicating a location in which eachsubsegment comprised in the media segment is stored in the mediasegment, and the segment index further comprising indicating informationwhich is used to indicate a location of data content corresponding tothe region that can be independently decoded in each subsegment;determining a to-be-acquired subsegment according to the segment index;and determining, according to a location in which the subsegment isstored in the media segment and the indicating information, the locationin which the data content corresponding to the region for the playbackon the terminal is stored in the media segment; acquiring, according tothe location in which the data content corresponding to the region forthe playback on the terminal is stored in the media segment, the datacontent corresponding to the region for the playback on the terminalfrom the media segment stored in the server; and playing, according tothe data content corresponding to the region for the playback on theterminal, a picture of the region for the playback on the terminal, andthe media segment comprising at least two subsegments.
 2. The method ofclaim 1, wherein the segment index is located in a header of the mediasegment.
 3. The method of claim 1, wherein the MPD file comprises acorrespondence between the region for the playback on the terminal andthe location in which the data content corresponding to the region forthe playback on the terminal is stored in the media segment, andacquiring the location in which the data content corresponding to theregion for the playback on the terminal is stored in the media segmentcomprises acquiring, from the MPD file according to the region for theplayback on the terminal and the correspondence between the region forthe playback on the terminal and the location in which the data contentcorresponding to the region for the playback on the terminal is storedin the media segment, the location in which the data content is storedin the media segment.
 4. The method of claim 1, wherein acquiring,according to the location in which the data content corresponding to theregion for the playback on the terminal is stored in the media segment,the data content corresponding to the region for the playback on theterminal from the media segment stored in the server comprises:determining, according to an address for acquiring the media segment andthe location in which the data content is stored in the media segment,an address, acquired from the MPD file, for acquiring the data content,the address for acquiring the data content comprising the address foracquiring the media segment and the location in which the data contentis stored in the media segment; sending the address for acquiring thedata content to the server; and receiving the data content that is fromthe server and corresponds to the address for acquiring the datacontent.
 5. The method of claim 1, wherein determining, according to theregion information, the region used for playback on the terminal fromthe region that can be independently decoded comprises: presenting, to auser of the terminal according to the region information, the regionthat can be independently decoded; and determining, as the region forthe playback on the terminal, a region selected by the user from theregion that can be independently decoded.
 6. The method of claim 1,wherein the media segment comprises multiple sections, each sectioncomprising multiple regions that can be independently and separatelydecoded, and a provider of the video determines a quantity of regionsthat can be independently decoded and a division form of the regionsthat can be independently decoded.
 7. The method of claim 1, wherein theregion information comprises a region index number of the region thatcan be independently decoded, a location parameter of the region thatcan be independently decoded in an entire video picture, a frame rateduring playback of the region that can be independently decoded, and atransmission bandwidth of the region that can be independently decoded.8. The method of claim 1, wherein a resolution of each region that canbe independently decoded is recorded in the region information.
 9. Avideo processing method, comprising: sending a media presentationdescription (MPD) file of a video to a terminal according to a request,from the terminal, for acquiring the MPD file of the video, the MPD filecomprising region information of a region that can be independentlydecoded in the video; receiving acquiring information from the terminal,the acquiring information being used for acquiring a segment index ofthe media segment, the segment index indicating a location in which eachsubsegment comprised in the media segment is stored in the mediasegment, the segment index further comprising indicating informationwhich is used to indicate a location of data content corresponding tothe region that can be independently decoded in each subsegment; sendingthe segment index to the terminal according to the acquiringinformation; receiving a location, from the terminal, in which datacontent corresponding to a region used for playback on the terminal isstored in a media segment of the video, the region for the playback onthe terminal being determined by the terminal according to the regioninformation and from the region that can be independently decoded; andsending, to the terminal according to the location in which the datacontent corresponding to the region for the playback on the terminal isstored in the media segment, the data content that is stored in themedia segment and corresponds to the location in which the data contentis stored in the media segment, the data content corresponding to theregion for the playback on the terminal being used for the terminal toplay a picture of the region, and the media segment comprising at leasttwo subsegments.
 10. A terminal, comprising: a transmitter configured tosend, to a server, a request for acquiring a media presentationdescription (MPD) file of a video; a receiver coupled to the transmitterand configured to receive the MPD file from the server, the MPD filecomprising region information of a region that can be independentlydecoded in the video; and a processor coupled to the transmitter and thereceiver and configured to: determine, according to the regioninformation comprised in the MPD file received by the receiver, a regionused for playback on the terminal from the region that can beindependently decoded; determine a to-be-acquired media segmentaccording to the MPD file received by the receiver; acquire a locationin which data content corresponding to the region, determined by theprocessor, for the playback on the terminal is stored in the mediasegment determined by the processor, the data content being used forplaying a picture of the region; acquire, according to the location,acquired by the processor, in which the data content corresponding tothe region for the playback on the terminal is stored in the mediasegment, the data content corresponding to the region for the playbackon the terminal from the media segment stored in the server; play,according to the data content that is acquired by the processor andcorresponds to the region for the playback on the terminal, a picture ofthe region for the playback on the terminal, the media segmentcomprising at least two subsegments; acquire, from the server, a segmentindex of the media segment, the segment index indicating a location inwhich each subsegment comprised in the media segment is stored in themedia segment, and the segment index further comprising indicatinginformation which is used to indicate a location of data contentcorresponding to the region that can be independently decoded in eachsubsegment; determine a to-be-acquired subsegment according to thesegment index; and determine, according to a location in which thesubsegment is stored in the media segment and a location in which asubsample corresponding to the region for the playback on the terminalin the region that can be independently decoded is stored in thesubsegment, the location in which the data content corresponding to theregion for the playback on the terminal is stored in the media segment.11. The terminal of claim 10, wherein the segment index is located in aheader of the media segment.
 12. The terminal of claim 10, wherein theMPD file comprises a correspondence between the region for the playbackon the terminal and the location in which the data content correspondingto the region for the playback on the terminal is stored in the mediasegment, and the processor is further configured to acquire, from theMPD file according to the region for the playback on the terminal andthe correspondence between the region for the playback on the terminaland the location in which the data content corresponding to the regionfor the playback on the terminal is stored in the media segment, thelocation in which the data content is stored in the media segment. 13.The terminal of claim 10, wherein the processor is further configuredto: determine, according to an address for acquiring the media segmentand the location in which the data content is stored in the mediasegment, an address, acquired from the MPD file, for acquiring the datacontent, the address for acquiring the data content comprising theaddress for acquiring the media segment and the location in which thedata content is stored in the media segment; send the address foracquiring the data content to the server; and receive the data contentthat is from the server and corresponds to the address for acquiring thedata content.
 14. The terminal of claim 10, wherein the processor isfurther configured to: present, to a user of the terminal according tothe region information, the region that can be independently decoded;and determine, as the region for the playback on the terminal, a regionselected by the user from the region that can be independently decoded.15. The terminal of claim 10, wherein the media segment comprisesmultiple sections, each section comprising multiple regions that can beindependently and separately decoded, and a provider of the videodetermines a quantity of regions that can be independently decoded and adivision form of the regions that can be independently decoded.
 16. Theterminal of claim 10, wherein the region information comprises a regionindex number of the region that can be independently decoded, a locationparameter of the region that can be independently decoded in an entirevideo picture, a frame rate during playback of the region that can beindependently decoded, and a transmission bandwidth of the region thatcan be independently decoded.
 17. The terminal of claim 10, wherein aresolution of each region that can be independently decoded is recordedin the region information.